package com.lanou3g.dllo.baidumusic.mine.myfavorite;

import com.lanou3g.dllo.baidumusic.database.MyFavorite;

import java.util.ArrayList;

/**
 * Created by dllo on 16/7/9.
 */
public class MyFavoriteManager {

    private static MyFavoriteManager myFavoriteManager;
    private ArrayList<MyFavorite> myFavorites;

    private MyFavoriteManager() {
        myFavorites = new ArrayList<>();
    }

    public ArrayList<MyFavorite> getMyFavorites() {
        return myFavorites;
    }

    public static MyFavoriteManager getInstance() {
        if (myFavoriteManager == null) {
            synchronized (MyFavoriteManager.class) {
                if (myFavoriteManager == null) {
                    myFavoriteManager = new MyFavoriteManager();
                }
            }
        }
        return myFavoriteManager;
    }
}
